package com.wp.design.itractor;

public class Test {
	public static void main(String[] args) {
		Course java = new Course("java");
		Course vue = new Course("vue");
		Course spring = new Course("spring");
		Course ext = new Course("ext");
		Course mybatis = new Course("mybatis");

		CourseAggregate courseAggregate = new CourseAggregateImel();
		courseAggregate.add(java);
		courseAggregate.add(vue);
		courseAggregate.add(spring);
		courseAggregate.add(ext);
		courseAggregate.add(mybatis);
		CourseItaractor itaractor = courseAggregate.getItaractor();
		while (itaractor.hasNext()){
			itaractor.next();
		}
		System.out.println("-----------------------------");
		courseAggregate.remove(java);
		courseAggregate.remove(spring);
		itaractor = courseAggregate.getItaractor();
		while (itaractor.hasNext()){
			itaractor.next();
		}
	}
}
